from static import config
from os import path


class ImageKey:
    KEY_CLIENT = "委托单位"
    KEY_APPLIANCE = "器具别名"
    KEY_TABLE_HEADER = "表头"
    KEY_OPEN = "打开"
    KEY_TABLE_FACTORY_NUMBER = "出厂编号"
    KEY_TABLE_CAPABILITY_CATEGORY = "能力类别"


class Scene:
    RECORD = "原始记录单"
    CHOOSE = "选择文件页"
    OTHER = "未知页面"


class ResUrl:
    ROOT_DIR = config.RES_PATH
    RECORD_PATH = path.join(ROOT_DIR, "record")
    CLIENT_PATH = path.join(RECORD_PATH, "Client.png")
    APPLIANCE_PATH = path.join(RECORD_PATH, "Appliance.png")
    TABLE_HEADER_PATH = path.join(RECORD_PATH, "TableHeader.png")
    TABLE_PATH = path.join(RECORD_PATH, "Table.png")
    TABLE_REG_RESULT_PATH = path.join(RECORD_PATH, "TableRegResult.xls")
    CUR_LINE_PATH = path.join(RECORD_PATH, "CurLine.png")
    FACTORY_NUMBER_PATH = path.join(RECORD_PATH, "FactoryNumber.png")
    CAPABILITY_CATEGORY_PATH = path.join(RECORD_PATH, "CapabilityCategory.png")

    OTHER_PATH = path.join(ROOT_DIR, "other")
    SUCCESS_PATH = path.join(ROOT_DIR, "success")
    FAIL_PATH = path.join(ROOT_DIR, "fail")
    PDF_PATH = path.join(ROOT_DIR, "pdf")
    CHOOSE_PATH = path.join(ROOT_DIR, "choose")
    OPEN_PATH = path.join(CHOOSE_PATH, "Open.png")

    RECORD_ALL = {ImageKey.KEY_CLIENT: CLIENT_PATH,
                  ImageKey.KEY_APPLIANCE: APPLIANCE_PATH,
                  ImageKey.KEY_TABLE_HEADER: TABLE_HEADER_PATH}
    CHOOSE_ALL = {ImageKey.KEY_OPEN: OPEN_PATH}

    ALL = {Scene.RECORD: RECORD_ALL,
           Scene.CHOOSE: CHOOSE_ALL}
